home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994…tember: Reference Library / Dev.CD Sep 94.toast / Periodicals / develop / develop Issue 13 / develop 13 code / DeviceLoopInDrag / OurMain.r < prev    next >
Encoding:
Text File  |  1992-10-30  |  2.8 KB  |  140 lines  |  [TEXT/MPS ]

  1. // OurMain.r
  2. // Resources for OurMain.
  3.  
  4. #define SystemSevenOrLater    true
  5.  
  6.         // Standard types
  7.  
  8. #ifndef __TYPES.R__ 
  9.     #include "Types.r"
  10. #endif
  11.  
  12. #ifndef __SYSTYPES.R__
  13.     #include "SysTypes.r"                // needed for version resource
  14. #endif
  15.  
  16.         // Our application resource constants and types
  17.  
  18. #include "OurMainShared.h"
  19.  
  20.         // Include the PICTs drawn by our app.
  21.  
  22. include "Picts.rsrc";
  23.  
  24. //--------------------------------------------------------------------------------
  25. // this DLOG and DITL are used as an About screen
  26.  
  27. resource 'DLOG' (rAboutDlog, "About…", purgeable) {
  28.     {40, 20, 180, 316},
  29.     dBoxProc,
  30.     invisible,
  31.     noGoAway,
  32.     0x0,
  33.     rAboutDlog,
  34.     "About",
  35.     centerMainScreen
  36. };
  37.  
  38. //--------------------------------------------------------------------------------
  39. resource 'DITL' (rAboutDlog, purgeable) {
  40.     {    /* array DITLarray: 6 elements */
  41.         /* [1] */
  42.         {108, 208, 128, 278},
  43.         Button {
  44.             enabled,
  45.             "OK"
  46.         },
  47.         /* [2] */
  48.         {8, 8, 24, 280},
  49.         StaticText {
  50.             disabled,
  51.             kProgramName
  52.         },
  53.         /* iAboutTitle=[3] */
  54.         {25, 8, 40, 280},
  55.         StaticText {
  56.             disabled,
  57.             ""
  58.         },
  59.         /* [4] */
  60.         {48, 8, 96, 280},
  61.         StaticText {
  62.             disabled,
  63.             "Use me, abuse me, drag me everywhere,\n"
  64.             "I'll still draw for you.  Brought to you\n"
  65.             "by John Powers, develop, and Mac DTS."
  66.         },
  67.     }
  68. };
  69.  
  70. //--------------------------------------------------------------------------------
  71. /* we use an MBAR resource to conveniently load all the menus */
  72.  
  73. resource 'MBAR' (rMenuBar, preload) {
  74.     { mApple, mFile };        /* one menu */
  75. };
  76.  
  77.  
  78. resource 'MENU' (mApple, preload) {
  79.     mApple,
  80.     textMenuProc,
  81.     0b1111111111111111111111111111101,    /* disable dashed line, enable About and DAs */
  82.     enabled,
  83.     apple,
  84.     {
  85.         "About "kProgramName"…", noIcon, nokey, nomark, plain;
  86.         "-", noIcon, nokey, nomark, plain
  87.     }
  88. };
  89.  
  90. resource 'MENU' (mFile, preload) {
  91.     mFile,
  92.     textMenuProc,
  93.     0b1111111111111111111111111111111,
  94.     enabled,
  95.     "File",
  96.     {
  97.         "Quit", noIcon, "Q", nomark, plain;
  98.     }
  99. };
  100.  
  101. //--------------------------------------------------------------------------------
  102. resource 'vers' (1, kProgramName, purgeable) {
  103.     kVersionBytes,
  104.     kVersionNumber,
  105.     kVersionNumber"  "kVersionDate " "kCopyright
  106. };
  107.  
  108. resource 'vers' (2, kProgramName, purgeable)
  109. {
  110.     0x01, 0x00, release, 0x00, verUS,
  111.     "1.0",
  112.     ""
  113. };
  114.  
  115. //--------------------------------------------------------------------------------
  116. type kCreator as 'STR ';
  117.  
  118. resource kCreator (0) {                // Creator (or Signature)   
  119.     kProgramName " " kVersionNumber " " kVersionDate " " kCopyright;
  120. };
  121.  
  122. //--------------------------------------------------------------------------------
  123. resource 'WIND' (kWindResID, "DeviceLoopInDrag", purgeable) {
  124.     {0, 0, 180, 440},
  125.     noGrowDocProc,
  126.     visible,
  127.     noGoAway,
  128.     0x0,
  129.     "DeviceLoopInDrag",
  130.     centerMainScreen
  131. };
  132.  
  133. //--------------------------------------------------------------------------------
  134. resource 'STR#' (kUserStrID, "User Strings", purgeable) {
  135.     {
  136.         "This application requires System 7."
  137.     };
  138. };
  139.  
  140.